//
//  MVData.m
//  __PRODUCTNAME__
//
//  Created by Hanlingyu on 16/08/15
//  Copyright (c) ltq. All rights reserved.
//

#import "MVData.h"
#import "MVShowPlay.h"
#import "MVContents.h"

@implementation MVData

+ (NSDictionary *)objectClassInArray{
    return @{@"mv_show_play" : [MVShowPlay class]};
}

- (void)setValue:(id)value forKey:(NSString *)key {
    
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"mv_show_play"]) {
        NSMutableArray<MVShowPlay *> *mvshowArr = [NSMutableArray array];
        for (NSDictionary *dict in value) {
            MVShowPlay *mvShowPlay = [MVShowPlay modelWithDict:dict];
            [mvshowArr addObject:mvShowPlay];
        }
        _mv_show_play = mvshowArr;
    } else if ([key isEqualToString:@"contents"]) {
        _contents = [MVContents modelWithDict:value];
    }
}

@end
